/**
 * 
 */
package core.worker;

import org.apache.log4j.Logger;

import core.util.COREServiceRegistry;

/**
 * Oggetto che rappresenta socket indirizzo:porta
 * @author Vincenzo Merlo, Scuderi Giovanni Luca, Paolo Giuffrida
 * 
 */
public class Address {

    @SuppressWarnings("unused")
	private final Logger logger = COREServiceRegistry.getLogger(Address.class.toString());
    private int port;
    private String IP;

    /**
     *
     */
    public Address() {
    }

    /**
     *
     * @param port
     */
    public void setPort(int val) {
        this.port = val;
    }

    /**
     *
     * @param ip
     */
    public void setIP(String val) {
        this.IP = val;
    }

    /**
     *
     * @return port
     */
    public int getPort() {
        return this.port;
    }

    /**
     *
     * @return ip
     */
    public String getIP() {
        return this.IP;
    }
    
    /**
     *
     * @return
     */
    @Override
    public String toString() {
    	return new StringBuilder(this.getClass().getName())
    		.append(" IP: ").append(this.getIP())
    			.append(" PORT: ").append(this.getPort()).toString();
    }
}
